﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DateFormaterDemo
{
    class DateFormater
    {
        public static string ParseDate(string input)
        {
            string[] formats = {"dd.MM.yyyy", "dd.MM.yy", "dd/MM/yyyy", "dd/MM/yy"};
            DateTime date;
            if (DateTime.TryParseExact(input, formats, System.Globalization.CultureInfo.InvariantCulture,
                System.Globalization.DateTimeStyles.None, out date))
            {
                return string.Format("{0:'day'=dd, 'month'=MM, 'year'=yyyy}", date);
            }
            throw new FormatException("Unknown format.");
        }

        static void Main()
        {
            string input = Console.ReadLine();
            string parsedDate = ParseDate(input);
            Console.WriteLine(parsedDate);
        }
    }
}
